package com.ruoyi.purchase.service.impl;

import java.util.List;

import com.ruoyi.purchase.mapper.PurchaseReturnGoodsMapper;
import com.ruoyi.purchase.pojo.PurchaseReturnGoods;
import com.ruoyi.purchase.service.PurchaseReturnGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 采购退货清单Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-04
 */
@Service
public class PurchaseReturnGoodsServiceImpl implements PurchaseReturnGoodsService
{
    @Autowired
    private PurchaseReturnGoodsMapper purchaseReturnGoodsMapper;

    /**
     * 查询采购退货清单
     *
     * @param id 采购退货清单主键
     * @return 采购退货清单
     */
    @Override
    public PurchaseReturnGoods selectPurchaseReturnGoodsById(Integer id)
    {
        return purchaseReturnGoodsMapper.selectPurchaseReturnGoodsById(id);
    }

    /**
     * 查询采购退货清单列表
     *
     * @param purchaseReturnGoods 采购退货清单
     * @return 采购退货清单
     */
    @Override
    public List<PurchaseReturnGoods> selectPurchaseReturnGoodsList(PurchaseReturnGoods purchaseReturnGoods)
    {
        return purchaseReturnGoodsMapper.selectPurchaseReturnGoodsList(purchaseReturnGoods);
    }

    /**
     * 新增采购退货清单
     *
     * @param purchaseReturnGoods 采购退货清单
     * @return 结果
     */
    @Override
    public int insertPurchaseReturnGoods(PurchaseReturnGoods purchaseReturnGoods)
    {
        return purchaseReturnGoodsMapper.insertPurchaseReturnGoods(purchaseReturnGoods);
    }

    /**
     * 修改采购退货清单
     *
     * @param purchaseReturnGoods 采购退货清单
     * @return 结果
     */
    @Override
    public int updatePurchaseReturnGoods(PurchaseReturnGoods purchaseReturnGoods)
    {
        return purchaseReturnGoodsMapper.updatePurchaseReturnGoods(purchaseReturnGoods);
    }

    /**
     * 批量删除采购退货清单
     *
     * @param ids 需要删除的采购退货清单主键
     * @return 结果
     */
    @Override
    public int deletePurchaseReturnGoodsByIds(Integer[] ids)
    {
        return purchaseReturnGoodsMapper.deletePurchaseReturnGoodsByIds(ids);
    }

    /**
     * 删除采购退货清单信息
     *
     * @param id 采购退货清单主键
     * @return 结果
     */
    @Override
    public int deletePurchaseReturnGoodsById(Integer id)
    {
        return purchaseReturnGoodsMapper.deletePurchaseReturnGoodsById(id);
    }
}
